﻿﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BGCMS.Models.Article>" %>
<% using (Html.BeginForm())
   {%>
<%: Html.ValidationSummary(true) %>
<div class="editor-label">
    <label for = "Title">Titill</label>
</div>
<div class="editor-field">
    <%: Html.TextBoxFor(model => model.Title) %>
    <%: Html.ValidationMessageFor(model => model.Title) %>
</div>
<div class="editor-label">
    <label for = "TextBody">Efni greinarinnar</label>
</div>
<div class="editor-field">
    <textarea id="TextBody" name="TextBody" rows="8" cols="30"><%= Model.TextBody %></textarea>
    <%: Html.ValidationMessageFor(model => model.TextBody) %>
</div>
<div class="editor-field">
    <label for = "TypeID">Tegund greinar</label>
</div>
<div class="editor-field">
    <select id="TypeID" name="TypeID">
        <option value="1" <%= Model.TypeID == 1 ? "selected='selected'" : "" %>>Almennt</option>
        <option value="2" <%= Model.TypeID == 2 ? "selected='selected'" : "" %>>Fræðigrein</option>
        <option value="3" <%= Model.TypeID == 3 ? "selected='selected'" : "" %>>Reynslusaga</option>
    </select>
</div>
<p>
    <input type="submit" value="Senda" />
</p>
<% } %>
